package com.hotai.comment.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.io.Serializable;
import java.util.Date;

@Table(name = "user_student")
@Data
public class UserStudent implements Serializable {

	private static final long serialVersionUID = 8948118021116421227L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@TableId(type = IdType.AUTO)
	@Column(name = "id")
	private Integer id;

	@Column(name = "name")
	private String name;

	@Column(name = "username")
	private String username;

	@Column(name = "password")
	private String password;

	@Column(name = "phone")
	private String  phone;

	/**
	 * 学习时长
	 */
	@Column(name = "zhang")
	private Integer zhang;

	//	@DateTimeFormat(pattern="yyyy-MM-dd")//存到数据库
//	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") //从数据库
	@Column(name = "create_date")
	private Date createDate;

	/**
	 * 最近学习时间
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")//存到数据库
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") //从数据库
	@Column(name = "xue_date")
	private Date xueDate;

	/**
	 * 学习次数
	 */
	@Column(name = "xue_num")
	private Integer xueNum;

	/**
	 * 完成度
	 */
	@Column(name = "completion")
	private Integer completion;

	@Column(name = "pid")
	private Integer pid;

	@Column(name = "coursewareid")
	private Integer coursewareid;

	/**
	 * 真实姓名
	 */
	@Column(name = "zhename")
	private String zhename;

	/**
	 * 近期登录时间
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")//存到数据库
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") //从数据库
	@Column(name = "deng_date")
	private Date dengDate;

	/**
	 * 用户属性
	 */
	@Column(name = "shu")
	private Integer shu;

	/**
	 * 机构id
	 */
	@Column(name = "sid")
	private Integer sid;

	@Column(name = "deid")
	private Integer deid;

	@Column(name = "img")
	private String img;

	@Column(name = "status")
	private Integer status;

	@Column(name = "type")
	private Integer type;

	@Column(name = "eid")
	private Integer eid;


	@Column(name = "salt")
	private String salt;

	@Column(name = "ad")
	private String   ad;

	@Column(name = "nickname")
	private String   nickname;

	@Column(name = "openid")
	private String   openid;

	@Column(name = "unionid")
	private String   unionid;

	@Column(name = "token")
	private String   token;

}
